/**
 * author      : dormi330
 * date        : 2018/6/26
 * project     : mybatis
 * description : adaptor 物流服务
 */

package com.deep.trade.adaptor.required.logistical;

import com.deep.trade.adaptor.required.MemberAddress;
import com.deep.trade.adaptor.required.sku.Sku;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class LogisticalService {

    /**
     * 运费计算 = f(sku, 数量, 发货地址, 收货地址)
     */
    /**
     * @param sku       sku
     * @param qty       数量
     * @param toAddress 收货地址
     * @return
     */
    public BigDecimal freightOfSku(Sku sku, int qty, MemberAddress toAddress) {
        return new BigDecimal("1");
    }

    public BigDecimal freightOfSku(String skuId, int qty, MemberAddress toAddress) {
        return new BigDecimal("1");
    }
}
